package learnjava.jvm;

import java.io.IOException;

public class TestFinalize {

    public static void main(String[] args) throws IOException {
        TestFinalize t = new TestFinalize();
        t = null;
        System.gc();
        System.in.read();
    }

    @Override
    protected void finalize() throws Throwable {
        super.finalize();
        System.out.println("finalized");
    }
}
